import 'package:flutter/material.dart';

class HomeItemModel with ChangeNotifier {
  List<ListItemBeam> itemList = [];

  void request() async {
    await Future.delayed(
      Duration(seconds: 1),
      () {
        for (int i = 0; i < 10; i++) {
          ListItemBeam itemBean =
              ListItemBeam(i, i * 10, "标题 $i", 'images/3.0/logo.jpg');
          itemList.add(itemBean);
        }
      },
    );
    notifyListeners();
  }

  // 获取数据的方法
  List<ListItemBeam> get tabList => itemList;
}

class ListItemBeam {
  int id;
  int price;
  String title;
  String img;
  bool isAdd = false;
  ListItemBeam(this.id, this.price, this.title, this.img);
}
